//
//  NetManager.h
//  TestAge2016(第六组)
//
//  Created by student on 16/4/11.
//  Copyright © 2016年 wk. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NetManager : NSObject

//1. 搜索图片
+(void) searchImagesByName:(NSString *)name
              successBlock:(void(^)(NSArray *imgList))successBlock
                 failBlock:(void(^)(NSError *error))failBlock;

//2. 测试年龄
/**
 *  测试年龄返回的数据
 *
 *  @param imageData    上传的图片二进制数据，类型:image/jpeg
 *  @param successBlock ageInfo的格式：
 [{     
        "faceId":null,
 "faceRectangle":{"top":297,"left":300,"width":405,"height":405},
    "attributes":{"gender":"Female","age":26.5}}]
 
 *  @param failBlock    失败后执行的代码
 */
+(void)testAgeByImageData:(NSData *)imageData
             successBlock:(void(^)(NSArray *ageInfo))successBlock
                failBlock:(void(^)(NSError *error))failBlock;

@end
